package com.xdl.flytest.service;

import com.xdl.flytest.bean.Report;
import com.xdl.flytest.dao.ReportMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Auther: 80736
 * @Date: 2019/1/26 19:45
 * @Description:
 */

@Service
public class ReportService {

    @Autowired
    private ReportMapper reportMapper;


    public List<Report> getReports() {
        return reportMapper.selectReports();
    }

    public void removeReport(Integer id) {
        reportMapper.deleteByPrimaryKey(id);
    }

    public Report getReportById(Integer id) {
        return reportMapper.selectByPrimaryKey(id);
    }
}
